import request from '../../../utils/request'

export function questionTypePaginationListApi(page_size, current_page) {
  /**
   * 指定分页信息查询问题类型信息列表接口
  */
  return request({
    url: '/api/resources/question-type/?page_size=' + page_size + '&current_page=' + current_page,
    method: 'GET',
  })
}


export function questionTypeSearchPaginationListApi(page_size, current_page, search_data) {
  /**
   * 指定查询内容获取问题类型信息接口——包含分页信息
  */
  return request({
    url: '/api/resources/question-type/?page_size=' + page_size + '&current_page=' + current_page + '&search_data=' + search_data,
    method: 'GET',
  })
}


export function questionTypeSearchApi(search_data) {
  /**
   * 指定查询内容获取问题类型信息接口
  */
  return request({
    url: '/api/resources/question-type/?search_data=' + search_data,
    method: 'GET',
  })
}

export function questionTypeListApi() {
  /**
   * 问题类型信息列表接口
  */
  return request({
    url: '/api/resources/question-type/',
    method: 'GET',
  })
}

export function questionTypeCreateApi(data) {
  /**
   * 问题类型信息创建接口
  */
  return request({
    url: '/api/resources/question-type/',
    method: 'POST',
    data: data,
  })
}


export function questionTypeDeleteApi (data) {
  /**
   * 问题类型信息删除接口
  */
  return request({
    url: '/api/resources/question-type/' + data['type'] + '/',
    method: 'DELETE',
  })
}

export function questionTypeUpdateApi (data) {
  /**
   * 问题类型信息更新接口
  */
  return request({
    url: '/api/resources/question-type/' + data['type'] + '/',
    method: 'PATCH',
    data: data
  })
}

export function questionTypeDetailApi (data) {
  /**
   * 单个问题类型信息接口
  */
  return request({
    url: '/api/resources/question-type/' + data['type'] + '/',
    method: 'GET',
  })
}
